<%-- 
    Document   : AllNhanVien
    Created on : Jun 23, 2013, 2:10:33 AM
    Author     : quannq
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<div id="comment-box">
    <input style="margin-bottom: -3px;" type="button"
           class="button-primary" value="Thêm Nhân Viên"
           onclick="modalFormAdd('addnhanvien');"/>
</div>
<br>
<table cellpadding="0" cellspacing="0" border="1" class="display example"
       style="color: black; width: 1000px;">
    <thead align="center">
        <tr>
            <th>ID</th>
            <th>Tên</th>
            <th>Mail</th>
            <th>Điện Thoại</th>
            <th>Địa chỉ</th>
            <th>Quyền</th>
            <th>Reset Pass</th>
        </tr>
    </thead>
    <tbody align="center">
        <c:if test="${fn:length(nhanvien) == 0}">
            <tr class="gradeX">
                <td>No data</td>
            </tr>
        </c:if>

        <c:if test="${fn:length(nhanvien) > 0}">
            <c:forEach items="${nhanvien}" var="nv">
                <tr class="gradeX">
                    <td>${nv.mand}</td>
                    <td><a href="javascript:modalFormUpdate('infonhanvien',${nv.mand});">${nv.tennd}</a></td>
                    <td><a href="mailto:${nv.username}">${nv.username}</a></td>
                    <td>${nv.dienthoai}</td>
                    <td>${nv.diachi}</td>
                    <td>${nv.quyen.tenquyen}</td>
                    <td><a href="#">reset</a></td>
                </tr>
            </c:forEach>
        </c:if>
    </tbody>
</table>
